//
//  Stack.h
//  level02
//
//  Created by iGxnon on 2021/11/11.
//

#import <Foundation/Foundation.h>
#import "StackFrame.h"

NS_ASSUME_NONNULL_BEGIN

@interface Stack : NSObject

// 栈空间
@property (nonatomic, strong) NSMutableArray <StackFrame *> *stackFrameList;

// 栈帧数量
@property (nonatomic, assign) int size;

// 栈指针
@property (nonatomic, assign) int pointer;

// 顶栈帧
@property (nonatomic, strong) StackFrame *top;

- (StackFrame *) pop;

- (void) push: (StackFrame *) stackFrame;

- (StackFrame *) get;

- (void) next;

- (void) before;

- (bool) hasNext;

@end

NS_ASSUME_NONNULL_END
